home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperHackers.cpt / Hyper-Hackers Queue 1.0 / card_15170.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  51 lines

  1. -- card: 15170 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3797
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 1
  9. ----- text -----
  10.  
  11. From: PUGH@NMFECC.ARPA
  12.  
  13. Date:   Mon, 1 Feb 88 13:59:32 PST
  14.  
  15. Here is a nifty little script that makes an arrow button go to the next card. 
  16.  
  17. It's beauty is that if you hold the button down it continues to be active 
  18. without waiting for the mouseUp.  The trick was to avoid the mouseUp once the 
  19. mouseStillDown had run since at that point the user will want to remain where 
  20. he is instead of continuing to the next card.  The reason for the mouseUp 
  21. handler is to account for mouse clicks that are shorter than the time alloted 
  22. to the mouseStillDown event.  Check it out.  I think these buttons feel real 
  23. nice.
  24.  
  25. Jon
  26.  
  27. on mouseStillDown
  28.   global beenHere
  29.   put true into beenHere
  30.   doIt
  31. end mouseStillDown
  32.  
  33. on mouseUp
  34.   global beenHere
  35.   if beenHere is empty then put false into beenHere
  36.   if not beenHere then
  37.     doIt
  38.   end if
  39.   put false into beenHere
  40. end mouseUp
  41.  
  42. on doIt
  43.   visual effect dissolve- put your own function in here
  44.   go to next card
  45. end doIt
  46.  
  47.  
  48.  
  49. -- part contents for background part 45
  50. ----- text -----
  51. Buttons that can be held down